#include <stdio.h>
#include <unistd.h>

int main(void)
{
    FILE *fp = fopen("/sys/devices/msc0/servo0/value","w");
    fprintf(fp,"1\n");
    fclose(fp);
    usleep(1000000); // 1s
    
    fp = fopen("/sys/devices/msc0/servo0/value","w");
    fprintf(fp,"255\n");
    fclose(fp);
    usleep(1000000); // 1s
    
    fp = fopen("/sys/devices/msc0/servo0/value","w");
    fprintf(fp,"127\n");
    fclose(fp);
    usleep(1000000); // 1s
    
    fp = fopen("/sys/devices/msc0/servo0/value","w");
    fprintf(fp,"-1\n");                                       //disable servo
    fclose(fp);
    
    return 0;
}
